package com.kevinxiaoge.ruoli.bean;

import org.springframework.http.HttpStatus;

/**
 * @author chengyuanyuan
 */

public enum ErrorCode {

    RESOURCE_NOT_FOUND(1001, HttpStatus.NOT_FOUND,"未找到该资源"),
    REQUEST_VALIDATION_FAILED(1002,HttpStatus.BAD_REQUEST,"请求数据格式校验失败");

    private final int code;

    private final HttpStatus status;

    private final String message;

    ErrorCode(int code, HttpStatus status, String message) {
        this.code = code;
        this.status = status;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public HttpStatus getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
}
